/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.fitcoders.inscripcion.service;

import com.fitcoders.inscripcion.dao.GenericDAO;
import com.fitcoders.inscripcion.model.Persona;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author Max
 */
@Service(value = "personaService")
public class PersonaServiceImpl implements PersonaService{

    @Autowired
    GenericDAO genericDAO;
    
    @Override
    public List list(String hql, Map<String, Object> param, Class clazz) throws Exception {
        return genericDAO.listHQL(hql, param, clazz);
    }

    @Override
    public Serializable save(Persona persona) throws Exception {
        return genericDAO.save(persona);
    }

    @Override
    public void update(Persona persona) throws Exception {
        genericDAO.update(persona);
    }

    @Override
    public Persona getByHQL(String hql, Map<String, Object> param) throws Exception {
        return genericDAO.getByHQL(hql, param, null);
    }
    
}
